<template>
	<view class="content">
		<listHead @onWodeFun="onWodeFun" :only="only" :title='written' :hasTop="true" :key="heyVaule"
			:style="{paddingTop:statusBarHeight + 'px'}" class="list-head">
		</listHead>

		<view class="content-list">
			<scroll-view scroll-y="true" class="scroll-Y" refresher-enabled="true" :refresher-triggered="triggered"
				:refresher-threshold="50" refresher-background="lightgreen" @refresherpulling="onPulling"
				@refresherrefresh="onRefresh" @refresherrestore="onRestore" @scrolltolower="scrolltolowerFun">
				<!-- 	<lsj-nlist class="scroll_box" ref="lsjNlist" init > -->

				<view v-for="(item,index) in hospitalpersonlist" :key="index"
					:class="['personlist',index==0?'onePerson':'']">
					<text
						:class="['heardercolor',item.CARETYPE == '特' ? 'tecolor': item.CARETYPE == 'Ⅰ' ? 'onecolor': item.CARETYPE == 'Ⅱ' ? 'twocolor' : item.CARETYPE == 'Ⅲ' ? 'threecolor' : 'threecolor']"></text>
					<view class="personinformation" @tap="Jump(item)">

						<view class="tabone">
							<view :class="['bedcolor',item.DellayFlag==='1'?'bedred':'']">{{item.BEDID_X}}</view>
							<view class="mrn">{{item.MRN}}</view>
						</view>
						<view class="tabtwo">
							<view class="hosinfo">

								<text class="pname">{{item.PNAME}}</text>
							</view>
							<text :class="item.PSEX == '女' ? 'sex' : 'mansex'">{{item.PSEX}}</text>
							<view
								:class="['rank', item.CARETYPE == '特' ? 'levelrankte': item.CARETYPE == 'Ⅰ' ? 'levelrankone' : item.CARETYPE == 'Ⅱ' ? 'levelranktwo' : item.SERIES == 'Ⅲ' ? 'levelrankthree' : '']">
								{{item.CARETYPE}}
							</view>
						</view>
						<view class="tabthree">

							<view
								:class="['mrn',item.CARETYPE == '特' ? 'levelrankte': item.CARETYPE == 'Ⅰ' ? 'levelrankone' :  item.CARETYPE == 'Ⅱ' ? 'levelranktwo' : item.CARETYPE == 'Ⅲ' ? 'levelrankthree':'']">
								主治医师：{{item.DRNAME}}</view>
							<view class="medcial">
								{{item.SERVICENAME}}
							</view>
						</view>
					</view>
					<view class="line"></view>
					<!-- 孩子 -->
					<view class="personinformation" v-if="item.list.length > 0" v-for="(item2,index2) in item.list"
						:key="index2">
						<view
							:class="['hearder-view',item2.CARETYPE == '特' ? 'teview': item2.CARETYPE == 'Ⅰ' ? 'oneview': item2.CARETYPE == 'Ⅱ' ? 'twoview' : 'threeview']">
							<text :class="['icon' ,'iconfont', item2.PSEX=='女'?'icon-icon-nv':'icon-icon-nan']"
								:style="{'color': (item2.CARETYPE == 'Ⅲ' || item2.CARETYPE == '') && item2.PSEX=='女'?'#FC8176': (item2.CARETYPE == 'Ⅲ' || item2.CARETYPE == '') && item2.PSEX=='男'?'#94B0FF':'#fff'}">
							</text>
						</view>
						<view class="tabone">
							<view class="bedcolor">{{item2.bedid}}</view>
							<view class="mrn">{{item2.mrn}}</view>
						</view>
						<view class="tabtwo">
							<view class="hosinfo">
								<text :class="item2.sex == '女' ? 'sex' : 'mansex'">{{item2.sex}}</text>
								<text class="pname">{{item2.name}}</text>
							</view>
							<view class="mrn">主治医师：{{item2.doctor}}</view>
						</view>
						<view class="tabthree">
							<view class="medcial">
								{{item2.doc}}
							</view>
							<view
								:class="['rank',item2.CARETYPE == '特' ? 'levelrankte': item2.CARETYPE == 'Ⅰ' ? 'levelrankone' : item2.CARETYPE == 'Ⅱ' ? 'levelranktwo' : item2.CARETYPE == 'Ⅲ' ? 'levelrankthree':'']">
								{{item2.CARETYPE}}
							</view>
						</view>
					</view>
				</view>
				<u-loadmore :status="status" :loadingText="loadingText" v-if="hospitalpersonlist.length>0" />
			</scroll-view>


			<!-- </lsj-nlist> -->
		</view>

		<hospitaldialog :show2="show" :hospitaltitle="hospitaltitle">
			<template v-slot:btn>
				<u-button type="primary" class="btn" text="确认" color="#7ADFCA" @tap="nav"></u-button>
				<u-button type="primary" class="btn1" text="取消" color="#FF6E91" @tap="cancel"></u-button>
			</template>
		</hospitaldialog>
		<signsTemplate :show2="vitalShow" @unolyCun="unolyCun">
			<template v-slot:btn>
				<u-button type="primary" text="取消" class="btn1" style="width: 100%;" color="#FF6E91" @tap="cancelslit">
				</u-button>
			</template>
		</signsTemplate>

		<loopMed :show="loopShow" :title="'病人列表'" :reportObj="loopObj" :radiolist="radiolist1" :teshuarray="teshuarray"
			@loopTion="loopTion">
		</loopMed>
		<scan-code @scanCodeId="scanCodeId" value="管理员" v-if="showScanCode"></scan-code>
		<comprehensive></comprehensive>
		<alarmpopup></alarmpopup>
	</view>
</template>

<script>
	import hospitaldialog from '../../components/html/hospitaldialog.vue'
	import listHead from '../../components/html/listHead.vue'
	import scanCode from "../../components/html/scan-code.vue"
	import signsTemplate from '../../components/html/signsTemplate.vue'
	import alarmpopup from "../../components/html/AlarmPopUp.vue"
	import comprehensive from "../../components/html/comprehensive.vue"
	import {
		mapMutations,
		mapState
	} from "vuex";
	import {
		Ward_GetPatBedList_IIS,
		Scan_yizhu_list,
		Scan_get_PatientInfo_V1,
		getLoginBaseInfo,
		PcaseIotcode
	} from '../../api/user.js'
	import testtest from "@/components/js/hexiii-nfc.js"
	import loopMed from "@/components/html/loopMed.vue"
	export default {
		components: {
			hospitaldialog,
			listHead,
			scanCode,
			signsTemplate,
			alarmpopup,
			loopMed,
			comprehensive
		},
		data() {
			return {
				heyVaule: 0,
				statusBarHeight: 17,
				show: false,
				// show2: false,
				triggered: false,
				loadmoreShow: false,
				only: true,
				written: '',
				hospitaltitle: '确定切换用户吗？',
				passArry: {},
				content: [],
				hospitalpersonlist: [],
				showMask: false,
				showScanCode: true,
				page: 1,
				allist: [],
				fromData: {
					pageNum: 1,
					pageSize: 20
				},
				refresh: '',
				loopShow: false,
				loopObj: [],
				tksList: [],
				radiolist: [{
						name: '完成用药',
						id: 'end',
					},
					{
						name: '未用药',
						id: 'mid',
					}
				],
				radiolist1: [{
						name: '完成用药',
						id: 'end',
					},
					{
						name: '恢复用药',
						id: 'start',
					},
					{
						name: '中断用药',
						id: 'mid',
					}
				],
				radiolist2: [{
						name: '完成采集',
						id: 'end',
					},
					{
						name: '恢复采集',
						id: 'start',
					},
					{
						name: '中断采集',
						id: 'mid',
					}
				],
				dataResult: [],
				teshuarray: [{
						label: '患者病情变化',
						value: 0
					},
					{
						label: '医嘱更改',
						value: 1
					},
					{
						label: '外出检查',
						value: 2
					},
					{
						label: '患者手术',
						value: 3
					},
					{
						label: '病人拒绝',
						value: 4
					},
					{
						label: '血透前停药',
						value: 5
					},
					{
						label: '其他',
						value: 6
					}
				],
				num: 1,
				timeOnline: null,
				isRefresher: false, //下拉刷新状态
				allPatientList: [],
				status: 'loadmore',
				loadingText: '下拉加载更多'
			}
		},
		computed: {
			...mapState('user', ['userInfo', 'passObj', 'scanningArray', 'gifArray', 'siveShow', 'vitalShow'])
		},
		onHide() {
			this.showScanCode = false
			this.heyVaule = 0
			testtest.removeFun()
		},
		onShow() {
			this.showScanCode = true
			//#ifdef APP-PLUS
			this.testNFC()
			// #endif
		},
		mounted() {
			this.getLoginBaseInfoFun();
			this.Ward_GetPatBedList_IISFun()
		},
	

		onLoad(opion) {

			console.log(uni.getStorageSync('gifArray'), 'gifArray');
			var _this = this
			// _this.Ward_GetPatBedList_IISFun()
			// _this.show2 = opion?.id ? Boolean(opion.id) : Boolean("")
			// this.Scan_yizhu_listFun()
			// this.Scan_get_PatientInfo_V1Fun()
			// _this.getLoginBaseInfoFun()

			_this.statusBarHeight = uni.getSystemInfoSync().platform === 'android' ? plus.navigator
				.getStatusbarHeight() :
				24; //状态栏高度
		},
		watch: {
			userInfo: {
				handler(newval) {
					if (newval?.HosKind) {
						// this.Ward_GetPatBedList_IISFun()
					}
				},
				// deep: true,
			},
		},
		methods: {
			...mapMutations("user", ["set_deleteArr", "set_deleteObj", "set_passObj", "set_scanningArray",
				"set_adminValue", "set_siveShow", "set_vitalShow", "set_userInfo"
			]),
			//刷新完成
			onRefresh() {
				this.Ward_GetPatBedList_IISFun()
			},
			//下拉刷新触发
			onPulling() {
				this.triggered = true;
			},
			//复位
			onRestore() {
				this.triggered = 'restore'; // 需要重置
				console.log("onRestore");
			},
			//滚动到底部
			scrolltolowerFun() {
				this.status = 'loading';
				this.loadingText = "正在加载中"
				if (this.allPatientList.length > 0) {
					setTimeout(() => {
						this.status = 'loadmore';
						this.loadingText = "下拉加载更多"
						this.hospitalpersonlist = this.hospitalpersonlist.concat(this.allPatientList.splice(0, 10))
					}, 200)
				} else {
					this.status = 'nomore';
					this.loadingText = "没有更多了"
				}

			},
			jampFun(event, data) {
				console.log(event);
				let that = this;
				that.num = 0
				that.timeOnline = setInterval(() => {
					that.num = that.num + 1;
					console.log(that.num);
				}, 200); // 200毫秒触发一次
				// uni.navigateTo({
				// 	url: data.url
				// });
			},
			touchendFun() {
				clearInterval(this.timeOnline); // 清除计时器
			},
			async testNFC() {
				//这里用异步获取读取到的NFC数据
				var user = uni.getStorageSync('userInfo')
				await testtest.listenNFCStatus(false).then(async (value) => {
					if (!value) {
						this.ScanErrorAudio()
						return
					} else {
						uni.navigateTo({
							url: '../DropDown/bracelet?id=' + value
						});
					}

					return;
					// const data = {
					// 	HosKind: user.HosKind,
					// 	deptbed: user.HosKind,
					// 	iotcode: value
					// }
					// const res = await this.$http.PcaseIotcode(data)
					// if (res.length > 0) {
					// 	if (res[0]?.result == '1') {
					// 		this.medicalRecord(res[0].msg)
					// 	} else {
					// 		uni.showToast({
					// 			title: res[0].msg, //显示的文字
					// 			// duration: 3000, //显示多少时间，默认1500毫秒
					// 			icon: "none", //自定义显示的图标，默认成功success，错误error,加载loading，不显示图标是none
					// 			mask: true
					// 		})
					// 	}
					// }
				})
			},
			loadData(refresh) {
				uni.showToast({
					title: '加载中...', //显示的文字
					// duration: 1500, //显示多少时间，默认1500毫秒
					icon: "loading", //自定义显示的图标，默认成功success，错误error,加载loading，不显示图标是none
					mask: true
				})
				this.refresh = refresh

				// // 下拉刷新重置请求参数
				// console.log(refresh,'refresh')
				this.fromData.pageNum++;
				this.Ward_GetPatBedList_IISFun()

				if (refresh) {
					this.fromData.pageNum = 1;
				}
			},
			onBackPress() {
				if (this.showMask) {
					this.showMask = false;
					return true;
				} else {
					if (!this.siveShow) {
						if (this.vitalShow) {
							this.set_vitalShow(false)
							return true;
						} else {
							uni.showModal({
								content: '确认退出程序么？',
								success: function(res) {
									if (res.confirm) {
										// 退出当前应用，改方法只在App中生效  
										plus.runtime.quit();
									} else if (res.cancel) {
										console.log('用户点击取消');
									}
								}
							});
							return true
						}

					} else {
						this.set_siveShow(false)
						return true
					}
				}
			},
			nav() {
				this.show = false
				this.set_userInfo(Object.assign(this.userInfo, {
					sPassword: ''
				}))
				// uni.removeStorageSync('userInfo.sOperJp')
				uni.redirectTo({
					url: '../index/index'
				});
			},
			Jump(data) {
				this.heyVaule++;
				this.set_siveShow(true)
				this.set_deleteObj(data)
				uni.removeStorageSync('passObj')
				uni.removeStorageSync('scanningArray')

				// uni.navigateTo({
				// 	url: '../patient/index'
				// });
			},
			cancel() {
				this.show = false
			},
			onWodeFun(e) {
				this.show = e
			},
			cancelslit() {
				this.set_vitalShow(false)
			},
			unolyCun(vaule) {
				this.show2 = vaule
			},
			async getLoginBaseInfoFun() {
				const user = uni.getStorageSync('userInfo')
				const data = {
					HosKind: user.hoscode,
					deptid: user.HosKind,
					empid: user.sUserid
				}
				const res = await this.$http.getLoginBaseInfo(data)
				if (res) {
					this.written = res[0].DEPTNAME + '-' + res[0].EMPNAME
					this.set_adminValue(this.written)

					return res
				}
			},
			async Ward_GetPatBedList_IISFun() {




				const user = uni.getStorageSync('userInfo')
				if (!user) {
					return
				}
				const data = {
					HosKind: user.hoscode,
					sOperdept: user.HosKind
				}
				const res = await this.$http.Ward_GetPatBedList_IIS(data)

				if (res.length == 1) {
					uni.showToast({
						title: "登录科室错误，请退出重新输入！", //显示的文字
						duration: 10000, //显示多少时间，默认1500毫秒
						icon: "none", //自定义显示的图标，默认成功success，错误error,加载loading，不显示图标是none
						mask: true
					})
				}
				if (res) {
					let Array = res.map((item, index) => ({
						...item,
						PSEX: item.PSEX == 'F' ? '女' : '男',
						CARETYPE: item.CARETYPE == '0' ? '特' : item.CARETYPE == '1' ? 'Ⅰ' : item
							.CARETYPE == '2' ? 'Ⅱ' : item.CARETYPE == '3' ? 'Ⅲ' : '',
						ids: index
					}))
					this.set_deleteArr(Array)



					this.list = Array
					this.triggered = false;

					// if (this.fromData.pageNum == 1) {

					this.allPatientList = Array
					this.hospitalpersonlist = [].concat(this.allPatientList.splice(0, 10))
					uni.showToast({
						icon: 'success',
						title: '加载数据成功！'
					})
					return
					// }
					// this.list.map(item => {
					// 	this.hospitalpersonlist.push(item)
					// })
					// let isMore = this.list.length <= Array.length;
					// if (this.hospitalpersonlist.length >= Array.length) {
					// 	isMore = false
					// 	this.$refs.lsjNlist.endLoad(this.refresh, isMore);
					// 	this.refresh = true
					// 	return
					// }
					// this.$refs.lsjNlist.endLoad(this.refresh, isMore);
					// uni.hideToast();
				}
			},
			// getpage(page, list) {
			// 	let sindex = (parseInt(page) - 1) * 10
			// 	let eindex = (parseInt(page) * 10)
			// 	let newList = list.slice(sindex, eindex)
			// 	setTimeout(() => {
			// 		uni.hideToast();
			// 	}, 500)
			// 	return newList
			// },
			loopTion(value, data, title, yuanyin) {
				this.loopObj.map((item, index) => {
					if (item.remark == data[0].remark && item.plandate == data[0].plandate && item
						.setno ==
						data[0].setno) {
						this.loopObj.splice(index, 1)
					}
				})
				this.loopShow = value
			},
			async scanCodeId(id, value) {
				console.log('id', value, id);
				if (value != '管理员') {
					return
				}
				try {
					console.log(id, value, '----');
					let idCode = Number(id) % 1 === 0
					if (idCode && String(id).length < 12) {
						// 扫码病历号
						this.medicalRecord(id)
						console.log(1);
					} else {
						if (String(id).startsWith("A1")) {
							uni.navigateTo({
								url: '../DropDown/Instrument?id=' + id
							});
							return;
						} else {
							// 扫码医嘱号
							this.doctorsOrder(id)
						}
					}
				} catch (e) {
					//TODO handle the exception
				}
			},
			async medicalRecord(value) {
				const user = uni.getStorageSync('userInfo')
				const data = {
					HosKind: user.hoscode,
					mrn: value
				}
				const res = await this.$http.ScanPatientinfo(data)
				if (res[0]?.result == '1') {
					this.set_passObj(res[0])
					uni.navigateTo({
						url: '../ListOfPatients/index'
					});
				}
			},
			async doctorsOrder(ScanString) {
				let mrnflag = false;
				try {
					if (String(ScanString).length < 12) {
						mrnflag = true;
					}
				} catch (e) {
					//TODO handle the exception
				}
				if (!mrnflag) {
					try {
						this.Scan_get_PatientInfo_V1Fun(ScanString)
					} catch (e) {}
				}
			},
			async sendEmptyMessage(ScanString, data) {

				if (data == null || data.length <= 0) {
					uni.showToast({
						title: "医嘱未找到，请联系管理员！", //显示的文字
						duration: 3000, //显示多少时间，默认1500毫秒
						icon: "none", //自定义显示的图标，默认成功success，错误error,加载loading，不显示图标是none
						mask: true
					})
					return
				} else {
					var proof = false;
					var reslist;
					let arr = [];
					data.map((item, index) => {
						if (item.result == '1') {
							proof = false;
							return
						} else if (item.result == '3') {
							if ("PO" == item.admission) {
								this.tksList = this.radiolist
							} else if (("L03" == item.prtype) || ("L10" == item.prtype)) {
								this.tksList = this.radiolist2
							} else {
								this.tksList = this.radiolist1
							}
							arr.push(item)
							proof = true;
							return
						} else if (item.result == '2') {
							uni.showToast({
								title: item.mark, //显示的文字
								duration: 2000, //显示多少时间，默认1500毫秒
								icon: "none", //自定义显示的图标，默认成功success，错误error,加载loading，不显示图标是none
								mask: true
							})
							proof = true;
							return
						} else {
							reslist = data.splice(index, 1);
							proof = true;
							return
						}
					})
					if (arr.length > 0) {
						this.loopObj = data
						this.loopShow = true
					}
					// if (!proof) {
					// 	this.set_scanningArray(this.dataResult)
					// 	// this.Scan_get_PatientInfo_V1Fun(ScanString)
					// } else {
					// 	uni.showToast({
					// 		title: reslist[0].result, //显示的文字
					// 		duration: 2000, //显示多少时间，默认1500毫秒
					// 		icon: "none", //自定义显示的图标，默认成功success，错误error,加载loading，不显示图标是none
					// 		mask: true
					// 	})
					// }
				}
			},
			async DaoSaomiaoYizhu(id) {
				const content = id.split('|')
				const user = uni.getStorageSync('userInfo')
				const obj = uni.getStorageSync('deleteObj')
				const data = {
					HosKind: user.hoscode,
					dobarcode: content[0],
					sOperdept: user.HosKind,
					sOperJp: user.sPassword
				}
				const res = await this.$http.Scan_yizhu_list(data);
				return res
			},
			async Scan_get_PatientInfo_V1Fun(content) {
				const user = uni.getStorageSync('userInfo')
				const obj = uni.getStorageSync('deleteObj')
				const data = {
					HosKind: user.hoscode,
					dobarcode: content,
					deptbed: user.HosKind,
					ns: '40022'
				}
				uni.showLoading({
					title: '加载中...', //显示的文字
					// duration: 5000, //显示多少时间，默认1500毫秒
					icon: "loading", //自定义显示的图标，默认成功success，错误error,加载loading，不显示图标是none
					mask: true
				})
				const [res, res2] = await Promise.all([this.$http.Scan_get_PatientInfo_V1(data), this
					.DaoSaomiaoYizhu(
						content)
				])
				console.log(res, res2, '6666');

				// let res = [{
				// 	result: "1",
				// 	mark: "",
				// 	mrn: 8025558,
				// 	series: 163,
				// 	remark: "芬太尼针  0.1mg×10\n",
				// 	ns: "4X164",
				// 	nsname: "胡青青",
				// 	dodate: "2023/2/14 11:11:28",
				// 	computerflag: "21",
				// 	plandate: "2023/2/11 15:53:31",
				// 	setno: 2038947863,
				// 	orderno: 2038947863,
				// 	admission: "IV ",
				// 	dobarcode: "",
				// 	prtype: "D",
				// 	admissionname: "静脉注射                      ",
				// 	exeflag: "1",
				// 	enddate: "",
				// 	pname: "张翠翠(测试)"
				// }]
				this.dataResult = res2

				if (res) {
					let reg = new RegExp("[\\u4E00-\\u9FFF]+", "g")
					if (res[0]?.result == '1') {
						// this.set_scanningArray(this.dataResult)
						// this.passArry = res[0]
						// this.set_passObj(res[0])
						// uni.navigateTo({
						// 	url: '../ListOfPatients/scanningTask'
						// });
						// uni.hideLoading();
						if (reg.test(this.dataResult[0].result)) {
							uni.showToast({
								title: this.dataResult[0].result, //显示的文字
								duration: 2000, //显示多少时间，默认1500毫秒
								icon: "none", //自定义显示的图标，默认成功success，错误error,加载loading，不显示图标是none
								mask: true
							})
							return
						} else {
							this.set_scanningArray(this.dataResult)
							this.passArry = res[0]
							this.set_passObj(res[0])
							uni.navigateTo({
								url: '../ListOfPatients/scanningTask'
							});
							uni.hideLoading();
						}
					} else if (res[0]?.result == '3') {
						uni.hideLoading();
						this.sendEmptyMessage(content, res)
					} else if (res[0]?.result == '2') {
						uni.hideLoading();
						this.passArry = {}
						uni.showToast({
							title: res[0].mark, //显示的文字
							duration: 2000, //显示多少时间，默认1500毫秒
							icon: "none", //自定义显示的图标，默认成功success，错误error,加载loading，不显示图标是none
							mask: true
						})
					} else if (reg.test(res[0].result)) {
						uni.hideLoading();
						this.passArry = {}
						uni.showToast({
							title: res[0].result, //显示的文字
							duration: 2000, //显示多少时间，默认1500毫秒
							icon: "none", //自定义显示的图标，默认成功success，错误error,加载loading，不显示图标是none
							mask: true
						})
					} else {
						uni.hideLoading();
						this.passArry = {}
						uni.showToast({
							title: '医嘱未找到！', //显示的文字
							duration: 2000, //显示多少时间，默认1500毫秒
							icon: "none", //自定义显示的图标，默认成功success，错误error,加载loading，不显示图标是none
							mask: true
						})
					}
				}
			},
			alpha_sort(target) {
				let obj = {},
					result = [],
					resget = [],
					resLi = [];
				target.map((item, index) => {
					let key = item.setno;
					if (key == 0) {
						resget.push({
							children: [item]
						});
						return
					}
					//如果有这个key，就push一个对象
					if (obj[key]) {
						obj[key].push(item);
						//如果没有这个key，就把对象设置成数组格式（方便后面push进去）
					} else {
						obj[key] = [item];
					}
				});
				//根据obj中有几个对象，挨个push进去，组成最后的数组
				for (const key in obj) {
					// console.log(obj[key]);
					const element = obj[key];
					let Arrye = this.checkRepeat(element, 'remark')
					if (Arrye.length > 0) {
						let Clits = this.alpha_sort1(Arrye)
						Clits.map(item => {
							resLi.push({
								children: item
							})
						})
					} else {
						result.push({
							children: element
						})
					}
				}
				result = [...result, ...resget, ...resLi]
				return result;
			},
			alpha_sort1(target) {
				let obj = {},
					result = [],
					resget = [],
					resLi = [];
				target.map((item, index) => {
					let key = item.plandate;
					//如果有这个key，就push一个对象
					if (obj[key]) {
						obj[key].push(item);
						//如果没有这个key，就把对象设置成数组格式（方便后面push进去）
					} else {
						obj[key] = [item];
					}
				});
				//根据obj中有几个对象，挨个push进去，组成最后的数组
				for (const key in obj) {
					// console.log(obj[key]);
					const element = obj[key]
					result.push(
						element
					)
				}
				result = [...result, ...resget, ...resLi]
				console.log(result);
				return result;
			},
			checkRepeat(arr, value) {
				var array = [];
				arr.forEach((item) => {
					if (item) {
						array.push(item[value]);
					}
				});
				if ((new Set(array)).size != arr.length) {
					return arr;
				}
				return false;
			}
		},
	}
</script>
<style scoped lang="scss">
	.content {

		width: 100%;
		// height: 100vh;
		// overflow: hidden;
		background-color: #F7FAFF;
	}

	.list-head {}

	.content-list {

		// padding-top: 50px;
		/*top值为header的高*/

		// overflow-y: scroll;
		// position: relative;

		.scroll-Y {
			box-sizing: border-box;
			height: calc(100vh - 120rpx);
		}
	}

	.hearder-view {
		width: 77px;
		height: 62px;
		border-radius: 8px;
		margin: 10px;
		display: flex;
		justify-content: center;
		align-items: center;

		text {
			font-size: 40px !important;
			color: #fff;
		}
	}

	.teview {
		background: #FF9A90;

		box-shadow: 1px 2px 6px 0px rgba(240, 138, 128, 0.5);
	}

	.oneview {
		background: #FF9FD1;
		box-shadow: 1px 2px 6px 0px rgba(255, 89, 248, 0.5);
	}

	.twoview {
		background: #A3D0FF;
		box-shadow: 1px 2px 6px 0px rgba(163, 208, 255, 0.5);
	}

	.threeview {
		background: #FFFFFF;
		box-shadow: 1px 2px 6px 0px rgba(112, 112, 112, 0.5);
	}

	.personlist {
		width: 734rpx;
		margin: 0 auto;
		height: 144rpx;
		// box-shadow: 0px 4rpx 8rpx 0px #E1E1E1;
		// border-radius: 12rpx;
		background: url("@/static/img/person_bg.png") no-repeat 100%;
		background-size: 734rpx 144rpx;

		// .heardercolor {
		// 	display: block;
		// 	width: 100%;
		// 	height: 10px;
		// 	background: #FFFFFF;
		// 	border-radius: 12rpx 12rpx 0px 0px;
		// }


		.tecolor {
			background: #FFB9B3 !important;
		}

		.onecolor {
			background: #FFCAE6 !important;
		}

		.twocolor {
			background: #CAE4FF !important;
		}

		.threecolor {
			background: #D6D6D6 !important;
		}

		.personinformation {
			display: flex;
			// background: #fff;

			.tabone {
				margin-top: 16rpx;

				margin-left: 28rpx;

				.bedcolor {

					font-size: 32rpx;
					color: #333333;
				}

				.bedred {
					background-color: red;
				}

				.mrn {
					margin-top: 20rpx;
					font-size: 32rpx;
					color: #333;

				}
			}

			.tabtwo {
				margin-top: 16rpx;
				// margin-left: 44rpx;
				width: 35%;

				.hosinfo {



					.pname {
						font-size: 32rpx;
						font-weight: 400;
						color: #333333;
					}
				}


				.sex {
					display: inline-block;
					// width: 34rpx;
					// height: 34rpx;
					// line-height: 32rpx;
					// border-radius: 50%;
					// background: #FC8176;
					color: #EE0000;
					font-size: 32rpx;
					text-align: center;
					margin-top: 26rpx;
					margin-left: 116rpx;
				}

				.mansex {
					display: inline-block;

					line-height: 32rpx;
					// border-radius: 15rpx;
					border-radius: 50%;

					color: #EE0000;
					font-size: 32rpx;
					text-align: center;
					margin-top: 26rpx;
					margin-left: 116rpx
				}



				.rank {
					display: inline-block;
					font-size: 32rpx;
					margin-left: 52rpx;

					color: #A4A4A4;


				}

				// .levelrankte {
				// 	color: #FFB9B3 !important;
				// }

				// .levelrankone {
				// 	color: #FF59F8 !important;
				// }

				// .levelrankthree {
				// 	color: #D6D6D6 !important;
				// }
			}

		}

		.tabthree {
			width: 39%;
			margin-top: 16rpx;

			margin-right: 20rpx;

			.mrn {
				font-size: 32rpx;
				color: #333;

				&.levelrankte {
					background-color: #fff !important;
				}

				&.levelrankone {
					background-color: red !important;
				}

				&.levelranktwo {
					background-color: #FFFF7F !important;
				}

				&.levelrankthree {
					background-color: #A5EDFF !important;
				}

			}



			.medcial {
				margin-left: 40rpx;
				margin-top: 20rpx;
				font-size: 32rpx;
				font-weight: 400;
				color: #4C9848;
				text-align: right;
			}


		}
	}

	.onePerson {
		margin-top: 20rpx !important;
	}

	.line {
		width: 690rpx;
		height: 2rpx;
		background: #EFF1F5;
		margin-left: 10rpx;
	}


	.u-reset-button ::v-deep {
		width: 304rpx;

		.u-button__text {
			font-size: 36rpx !important;
			font-family: SourceHanSansCN-Medium, SourceHanSansCN;
			font-weight: 500;
			color: #FFFFFF;
			line-height: 54rpx;
			letter-spacing: 28rpx;
		}
	}

	.btn {
		box-shadow: 0px 2px 6px 0px #6AC8B5;
	}

	.btn1 {
		box-shadow: 0px 2px 6px 0px #ff6e91;
	}

	.scroll_box {

		// height: 80%;
		position: absolute !important;
		// overflow-y: scroll;
	}
</style>
